package show.me.the.money.dao;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class LogonInterceptor implements MethodInterceptor {

	private static final Log logger = LogFactory.getLog(LogonInterceptor.class);
	@Override
	public Object invoke(MethodInvocation arg0) throws Throwable {
		logger.info("before...");
		Object[] os = arg0.getArguments();
		for(Object o:os){
			System.out.println(o);
		}
		System.out.println(arg0.getMethod());
		Object result = arg0.proceed();
		logger.info("after...");
		return result;
	}

	
	
}
